home *** CD-ROM | disk | FTP | other *** search
-
- {$M 1024,0,0} {use the smallest memory possible}
- {$F+,R-} {we want this to be allocated as FAR}
-
- {BINDEMO1 V1.01 Copyright 1989 Michael Day as of 16 April 1989}
- { all rights reserved }
- PROGRAM BinDemo1;
- uses BinIpc;
-
- const Pass : integer = 1;
- var Dbs : string;
-
- procedure Pad(var S:string);
- begin
- while length(S) < pred(sizeof(S)) do
- S := S+' ';
- end;
-
- function fstr(I:integer):string;
- var S:string;
- begin
- str(I,S);
- fstr := S;
- end;
-
- begin
- if IPC = nil then
- begin
- writeln('Hey, you''re trying to run this from DOS. No can do.');
- halt(1);
- end;
- BinLoadCheck;
- writeln('Number of times we have entered the BIN program: ',Pass);
- if GetDbString(DbS) then
- begin
- writeln(Dbs);
- Dbs := 'This is message '+fstr(Pass)+' passed back from the BIN program';
- Pad(Dbs);
- if SetDbString(DbS) then {nop};
- end;
- inc(Pass);
- end.
-